import logging
import os
import tempfile

import dotenv
from loguru import logger

from business.video import OpenVideo

log_path = os.path.join(tempfile.gettempdir(), 'video.log')
logger.add(log_path, level=logging.INFO, rotation="1024KB", retention=5)
dotenv.load_dotenv(dotenv.find_dotenv(), override=True)

if __name__ == '__main__':
    obj = OpenVideo()
    obj.run()
